﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Web;
using System.Web.Mvc;
using COM.Domain;
using SampleApp.Domain;

namespace System.Web.Helpers
{
    public static class SampleUserLabelExtensions
    {
        public static SysUser SampleUserLabel(this HtmlHelper helper, string userCode)
        {
            var userService = COM.Web.Unity.Instance.GetService<SampleApp.Service.ISysUserService>();
            var userList = userService.GetSysUserList();
            return KeyValueLabelExtensions.KeyValueLabel(helper, userCode, userList, (i => i.UserCode));
        }
    }
}